% ------------------------------------------------------------------------ 
% Read me File for State-Level Results in
% Ben-David, Itzhak, Sebastian Weber, and Pascal Towbin 
% "Inferring Expectations from Observables: Evidence from the Housing Market" 
% Review of Economics and Statistics
% ------------------------------------------------------------------------ 

A. Files used for State Level Results

Replication files for the State-level results include:

- MAIN_FILE_STATE_LEVEL:  		% Main file to reproduce results and calls on subfiles

- estimation_identification_sta: 	% Subroutine: Estimates SVAR and imposes Sign Restrictions 
- construct_y_sta:			% Subroutine: Finds start and end observation by state and constructs state-by-state estimation data
- define_vars_sta; 			% Subroutine: Makes few data definitions and labels
- comp_histdecomp_sta;        		% Subroutine: Computes Historical Decomposition
- boombustsize_sta;           		% Subroutine: Computes size of boom and bust
- histdecomp_figure_sta;    		% Subroutine: Figures showing historical decomposition (Figure 5 a and b) 
- Top20BoxWhiskerChart_sta;   		% Subroutine: Figures showing shock contribution to housing boom (Figure 6 a to d) 
- pc_analysis_sta;                	% Subroutine: Figures showing national component per shock (Figure 7)
- boom_bust_scatter_sta;          	% Subroutine: Scatter plots showing shock contributions and housing boom size (Figure 8)
- hist_decomp_figure_old_new_sta;	% Subroutine: Figures showing contribution of old shocks (Figure 9 a and b)

The code draws also on standard procedures in Matlab and codes by other authors for standard estimation procedures that are not mentioned here, but are contained in the "auxilliary" subfolder. 


B. Data

ΔP: Log change in the real house price index. Nominal state level house price indices provided by the FHFA are deflated using the regional CPI-All Urban Consumer indices provided by the BLS. 
ΔS: The change in the supply of housing is measured as the log of new private housing permits from the U.S. Census Bureau. 
V: Aggregate vacancy rates at the state level are constructed combining vacancy rates for owner-occupied homes as well as for rental homes (vacancy categories “vacant for rent” and “vacant for
sale.”) from the U.S. Census Bureau, using as weights the homeownership rate, based on region-year homeownership statistics from the U.S. Census Bureau. 
I: Real mortgage rates are obtained by deflating nominal state-year–level mortgage rates by national 10-year inflation expectations. State-year–level mortgage rates are available on the FHFA website, and the national 10-year inflation expectation from Macroeconomic Advisors (via Haver). 
P-t-I: The house price–to–median income ratio is computed by deflating the FHFA state-level house price index by the respective state-year median income data from the U.S. Census Bureau

C. Software and Version

Matlab, version R2020b





